package org.ziyuandagong.account.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 角色权限关联表（t_role_permission），建立角色与权限的多对多关系
 * </p>
 *
 * @author 自愿打工
 * @since 2024-12-06
 */
@TableName("t_role_permission")
@ApiModel(value = "RolePermission对象", description = "角色权限关联表（t_role_permission），建立角色与权限的多对多关系")
public class RolePermission implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("关联记录 ID，主键，采用自增长整数类型")
    @TableId(value = "role_permission_id", type = IdType.AUTO)
    private Integer rolePermissionId;

    @ApiModelProperty("角色 ID，关联角色表的 role_id，建立多对多关系")
    private Integer roleId;

    @ApiModelProperty("权限 ID，关联权限表的 permission_id，建立多对多关系")
    private Integer permissionId;

    public Integer getRolePermissionId() {
        return rolePermissionId;
    }

    public void setRolePermissionId(Integer rolePermissionId) {
        this.rolePermissionId = rolePermissionId;
    }
    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
    public Integer getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    @Override
    public String toString() {
        return "RolePermission{" +
            "rolePermissionId=" + rolePermissionId +
            ", roleId=" + roleId +
            ", permissionId=" + permissionId +
        "}";
    }
}
